<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>物业管理软件</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
	<meta name="author" content="Muhammad Usman">

	<#include "*/pubcss.ftl">
	<script src="${base}/script/pagination.js"></script>
		
</head>

<body>
	<#include "*/top.ftl">
	<!-- topbar ends -->
	<div class="container-fluid">
		<div class="row-fluid">
				
			<#include "*/left.ftl">
			<div id="content" class="span10">
			<!-- content starts -->
			<div>
				<ul class="breadcrumb">
					<li>
						<a href="#">仪表管理</a> <span class="divider">/</span>
					</li>
					<li>
						<a href="#">水表管理</a>
					</li>
				</ul>
			</div>
		    <div class="row-fluid sortable">
				<div class="box span2">
					<div class="box-header well">
						<h2><i class="icon-edit"></i>套户菜单</h2>
					</div>
					<div class="box-content">
						 <div class="zTreeDemoBackground left">
						    <ul id="menup" class="ztree"></ul>
						 </div>
					</div>
				</div><!--/span-->
				<div class="box span10">
					<div class="box-header well">
						<h2><i class="icon-edit"></i>水表信息</h2>
					</div>
					<div class="box-content">
					    <button type="button" class="btn btn-primary" id="addLeaf" onclick="window.location.assign('../dashboard/load_Watermeter.action')">新增</button>
						<button type="button" class="btn btn-primary" id="addLeaf" onclick="window.history.back()">返回</button>
						<input class="input-xlarge focused" id="cid" name="cid" type="hidden" value="${(cid)?if_exists}">
						<input class="input-xlarge focused" id="bid" name="bid" type="hidden" value="${(bid)?if_exists}">
						<input class="input-xlarge focused" id="uid" name="uid" type="hidden" value="${(uid)?if_exists}">
						<input class="input-xlarge focused" id="rid" name="rid" type="hidden" value="${(rid)?if_exists}">
						<table class="table table-bordered table-striped table-condensed">
						  <thead>
							  <tr>
								  <th>房号</th>
								  <th>表号</th>
								  <th>大小</th>
								  <th>位置</th>
								  <th>更换周期</th>
								  <th>分摊规则</th>
								  <th>承担比例</th>
								  <th>抄表人员</th>
								  <th>操作</th>
							  </tr>
						  </thead>   
						  <tbody>
						    <#list watermeters as meter>
						        <#assign index=1>
						        <#list meter.watermeterRooms as rooms>
								<tr>
									<td>${(rooms.roomcode)?if_exists}</td>
									<td class="center">${(meter.snum)?if_exists}</td>
									<td class="center">${(meter.size)?if_exists}</td>
									<td class="center">${(meter.position)?if_exists}</td>
									<td class="center">${(meter.cycle)?if_exists}</td>
									<td class="center">${(meter.spread.sname)?if_exists}</td>
									<td class="center">
										${(rooms.compare)?if_exists}
									</td>
									<td class="center">
										${(anmeter.readPerson.pname)?if_exists}
									</td>
									<#if index==1>
									<td class="center" rowspan="${meter.watermeterRooms?size}">
										<a class="btn btn-success" href="javascript:view('${(meter.wmcode)?if_exists}')">
											<i class="icon-zoom-in icon-white"></i>  
											查看                                           
										</a>
										<a class="btn btn-info" href="../dashboard/load_Watermeter.action?watermeter.wmcode=${(meter.wmcode)?if_exists}">
											<i class="icon-edit icon-white"></i>  
											修改                                            
										</a>
										<a class="btn btn-danger" href="javascript:remove('${(meter.wmcode)?if_exists}')">
											<i class="icon-trash icon-white"></i> 
											删除
										</a>
									</td>
									</#if>
								</tr>
								<#assign index=index+1>
								</#list>
							</#list>
							
						  </tbody>
					  </table>
					  <div class="pagination pagination-centered">
						  <ul>
							<li><a href="javascript:load('first','../dashboard/init_Watermeter.action','${(rownum)?if_exists}','${(currentpage)?if_exists}','${(pageSize)?if_exists}',['cid','bid','uid','rid']);">首页</a></li>
							<li>
							  <a href="javascript:load('forward','../dashboard/init_Watermeter.action','${(rownum)?if_exists}','${(currentpage)?if_exists}','${(pageSize)?if_exists}',['cid','bid','uid','rid']);">上一页</a>
							</li>
							<li><a href="javascript:load('back','../dashboard/init_Watermeter.action','${(rownum)?if_exists}','${(currentpage)?if_exists}','${(pageSize)?if_exists}',['cid','bid','uid','rid']);">下一页</a></li>
							<li><a href="javascript:load('last','../dashboard/init_Watermeter.action','${(rownum)?if_exists}','${(currentpage)?if_exists}','${(pageSize)?if_exists}',['cid','bid','uid','rid']);">尾页</a></li>
						  </ul>
					  </div>  
					</div>
				</div><!--/span-->
			</div><!--/row-->
		   
		  
       
			<!-- content ends -->
			</div><!--/#content.span10-->
		</div><!--/fluid-row-->

		
	</div><!--/.fluid-container-->

	<#include "*/infotemplate/alert.ftl">
    <#include "*/infotemplate/saveinfo.ftl">
    <#include "*/pubjs.ftl">
    <script src='${base}/script/dashboard/watermeter_manager.js'></script>
</body>
</html>
